package com.ruoyi.leave.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.leave.mapper.HrLeaveApplicationMapper;
import com.ruoyi.leave.domain.HrLeaveApplication;
import com.ruoyi.leave.service.IHrLeaveApplicationService;

/**
 * 请假申请Service业务层处理
 * 
 * @author gy
 * @date 2025-05-20
 */
@Service
public class HrLeaveApplicationServiceImpl implements IHrLeaveApplicationService 
{
    @Autowired
    private HrLeaveApplicationMapper hrLeaveApplicationMapper;

    /**
     * 查询请假申请
     * 
     * @param id 请假申请主键
     * @return 请假申请
     */
    @Override
    public HrLeaveApplication selectHrLeaveApplicationById(Long id)
    {
        return hrLeaveApplicationMapper.selectHrLeaveApplicationById(id);
    }

    /**
     * 查询请假申请列表
     * 
     * @param hrLeaveApplication 请假申请
     * @return 请假申请
     */
    @Override
    public List<HrLeaveApplication> selectHrLeaveApplicationList(HrLeaveApplication hrLeaveApplication)
    {
        return hrLeaveApplicationMapper.selectHrLeaveApplicationList(hrLeaveApplication);
    }

    /**
     * 新增请假申请
     * 
     * @param hrLeaveApplication 请假申请
     * @return 结果
     */
    @Override
    public int insertHrLeaveApplication(HrLeaveApplication hrLeaveApplication)
    {
        return hrLeaveApplicationMapper.insertHrLeaveApplication(hrLeaveApplication);
    }

    /**
     * 修改请假申请
     * 
     * @param hrLeaveApplication 请假申请
     * @return 结果
     */
    @Override
    public int updateHrLeaveApplication(HrLeaveApplication hrLeaveApplication)
    {
        return hrLeaveApplicationMapper.updateHrLeaveApplication(hrLeaveApplication);
    }

    /**
     * 批量删除请假申请
     * 
     * @param ids 需要删除的请假申请主键
     * @return 结果
     */
    @Override
    public int deleteHrLeaveApplicationByIds(Long[] ids)
    {
        return hrLeaveApplicationMapper.deleteHrLeaveApplicationByIds(ids);
    }

    /**
     * 删除请假申请信息
     * 
     * @param id 请假申请主键
     * @return 结果
     */
    @Override
    public int deleteHrLeaveApplicationById(Long id)
    {
        return hrLeaveApplicationMapper.deleteHrLeaveApplicationById(id);
    }
}
